* lisp/window.el (window-deletable-p): Use next-frame.
authorChong Yidong <cyd@stupidchicken.com>
Tue, 13 Sep 2011 19:10:32 +0000 (15:10 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Tue, 13 Sep 2011 19:10:32 +0000 (15:10 -0400)
lisp/ChangeLog
lisp/window.el

index 94f2f5589452a73fb86dfdba26bbe4e4cf259ed9..ac946fe0f48508d1f7337fac4b920669c34f8081 100644 (file)
@@ -1,3 +1,7 @@
+2011-09-13  Chong Yidong  <cyd@stupidchicken.com>
+
+       * window.el (window-deletable-p): Use next-frame.
+
 2011-09-13  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (window-auto-delete): Remove.
index 26d29db499349ce9688058c601c01f95ad4eda07..3a229a4e44718110872ab896f8eaad344a161c44 100644 (file)
@@ -2274,15 +2274,10 @@ frame."
         (buffer (window-buffer window)))
     (cond
      ((frame-root-window-p window)
-      ;; WINDOW's frame can be deleted only if there are other visible
-      ;; frames on the same terminal.
-      (when (let ((terminal (frame-terminal frame)))
-             (catch 'found
-               (dolist (f (delq frame (frame-list)))
-                 (and (eq terminal (frame-terminal f))
-                      (frame-visible-p f)
-                      (throw 'found t)))))
-          'frame))
+      ;; WINDOW's frame can be deleted only if there are other frames
+      ;; on the same terminal.
+      (unless (eq frame (next-frame frame 0))
+       'frame))
      ((or ignore-window-parameters
          (not (eq (window-parameter window 'window-side) 'none))
          (and parent (eq (window-parameter parent 'window-side) 'none)))